# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=File-Which
pkgname=perl-${_realname}
pkgver=1.23
pkgrel=1
pkgdesc="Portable implementation of which"
arch=('any')
url="https://metacpan.org/release/File-Which"
groups=('perl-modules')
depends=('perl' 'perl-Test-Script>=1.05')
license=('GPL' 'PerlArtistic')
source=("https://www.cpan.org/authors/id/P/PL/PLICEASE/${_realname}-${pkgver}.tar.gz")
sha256sums=('b79dc2244b2d97b6f27167fc3b7799ef61a179040f3abd76ce1e0a3b0bc4e078')

build() {
  cd "$srcdir/${_realname}-${pkgver}"
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
